Skip to main content

MUNIT function

The MUNIT function returns a unit matrix of size dimension x dimension. The result of this function is an array of form:

1 0 … 0

0 1 ... 0

0 0 … ...

0 0 … 1

Parts of a MUNIT function​

MUNIT(dimension)

PartDescription
dimensionRequired. The size of the unit matrix. Dimension must be an integer greater than zero.

Sample formulas​

Example 1:  MUNIT(1)

Example 2: MUNIT(3)

Notes​

If dimension is less than 1, MUNIT returns a #VALUE error.

Examples​

Result for A1=MUNIT(1)

A
11
2

Result for A1= MUNIT(3)

ABC
1100
2010
3001
  • MMULT: Calculates the matrix product of two matrices specified as arrays or ranges.
  • RANDARRAY: The RANDARRAY function generates an array of random numbers between 0 and 1.